package example.pattern.visitor;

public class File extends Entry {
	private Directory directory;
	private String name;
	private int size;
	
	
	public File(String name, int size) {
		super();
		this.name = name;
		this.size = size;
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getSize() {
		return size;
	}
	public void setSize(int size) {
		this.size = size;
	}
	
	public void setDirectory(Directory direcotry){
		this.directory = direcotry;
	}
	
	@Override
	public void acceptVisitor(Visitor visitor){
		super.acceptVisitor(visitor);
		this.visitor.visit(this);
	}
}
